<?php
/**
* エラーチェッククラス
**/
require_once( '../system/Class_M_DAO.php' );
class Class_M_COST_DM_TYPE  extends Class_M_DAO {
	//protected properties begin
	/**
	 *
	 * テーブル名
	 *
	 * @access    protected
	 * @var       string
	 *
	 */
	protected $_table  = "M_COST_DM_TYPE";
	
	/**
	 *
	 * 主キー名
	 *
	 * @access    protected
	 * @var       string
	 *
	 */
	protected $_pkey   = "id";
	
	/**
	 *
	 * ソート順
	 *
	 * @access    protected
	 * @var       string
	 *
	 */
	 protected $_order = " id";
	
	 protected $_cols  = array(
	 	"type_name"       => array(AOKI_VARTYPE_STR)
	 );
	
	 protected $_checks  = array(
	 	"type_name"       => array( "EXIST"  ),
	 );
	 
	 //maxlength 
	 protected $_maxlens  = array(
		"type_name "  =>  30  
	 );

	
	 public function search($where ,&$page = NULL ){	
	 	
		$sql = "SELECT a.*,(select  user_name FROM M_LOGIN where id  = a.u_user) as m_user_name from {$this->_table}  a ";
		return  parent::search($where ,$page ,$sql);
	}
	
	
	
	
}

?>